<?php 
	$add_link_display   =  check_module('offdate', 'add') ? "" : "display:none";
	$edit_link_display  =  check_module('offdate', 'edit') ? "" : "style='display:none'";
	$skill_indexed_arr = create_indexed_array(getAllskills());
?>




  <div class="successfull" style="display:<?php echo ($this->session->flashdata('userMesg') ? 'block' : 'none') ?> ">
                <?php echo $this->session->flashdata('userMesg'); ?>  
            </div>
            	
		<div>
              <div class="extra_links" style="padding:5px 0px; float:right;<?php echo $add_link_display; ?>" align="right">
                    <a class="button" href="<?php echo base_url().$this->uri->segment(1).'/save/'; ?>"><span>Add <?php echo $page_heading; ?></span></a>
              </div>
              <div style="clear:both"></div>
              
      
            	<div class="headingBox">
                <div class="FloatLeft"><img src="<?php echo imageUrl(); ?>red_leftRound.jpg" width="5" height="24" alt="" /></div>
             	 <div class="red_midRound" style="width:992px;"><?php echo $page_heading; ?></div>
                <div class="FloatLeft"><img src="<?php echo imageUrl(); ?>red_rightRound.jpg" width="5" height="24" alt="" /></div>
            </div>
            
            <div class="whiteBox">
       			 <div class="tbl_bgcolor">
            <form action="<?php echo base_url().$this->uri->segment(1); ?>" method="get">
                <input type="hidden" value="1" name="sbmt" id="action">
                <table width="50%" cellspacing="0" cellpadding="4" border="0" align="center">
                    <tbody>
                        <tr>
                            <td nowrap="nowrap">
                                <strong>Holidate Date:</strong>
                            </td>
                            <td>
                                <input type="text" size="25"  class="class_datepicker" value="<?php echo $this->input->get('holiday_date'); ?>" id="holiday_date" name="holiday_date"  >
                            </td>
                            <td>
                                <strong>Skill</strong>
                            </td>
                            <td>
                                <?php 
									$skill_id = $this->input->get('skill_id');
									echo create_select("skill_id", getAllskills(), $skill_id, array('value'=>'id', 'label'=>'name') );
								?>
                            </td>
                            <td>
                                <input type="submit" class="submitBtn_sml" value="">
                            </td>
                        </tr>
                    </tbody>
                </table>
            </form>
        </div>
    			</div>
            
      <div class="headingBox"  style="padding-top:10px;">
                <div class="FloatLeft"><img src="<?php echo imageUrl(); ?>red_leftRound.jpg" width="5" height="24" alt="" /></div>
              <div class="red_midRound" style="width:992px;"><span class="red_midRound" style="width:992px;"><?php echo $page_heading; ?></span></div>
                <div class="FloatLeft"><img src="<?php echo imageUrl(); ?>red_rightRound.jpg" width="5" height="24" alt="" /></div>
            </div>
            

            <div>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td><table width="100%" cellspacing="5" cellpadding="2" class="subContentTable">
                        <tr>
                        <td height="20" class="head3" width="30px;"># No</td>
                        <td height="20" class="head3">Holiday Date</td>
                        <td height="20" class="head3">OFF Start Time</td>
                        <td height="20" class="head3" >OFF End Time</td>
                        <td height="20" class="head3" >Extension</td>
                        <td height="20" class="head3" >Skill</td>
                        <td height="20" class="head3" <?php echo $edit_link_display; ?>>Edit</td>
                      </tr>
                        <?php 
						$cnt = $start;
						foreach($results as $row) 
						{
							$bg_color = ($cnt%2 == 0) ? "#ffffff" : "#fff1d5";
							$cnt++;
						?>
                        <tr bgcolor="<?php echo $bg_color; ?>">
                        <td align="left"><?php echo $cnt; ?></td>
                        <td align="left"><?php echo $row->holiday_date; ?></td>
                        <td align="left"><?php echo $row->off_start_time; ?></td>
                        <td align="left"><?php echo $row->off_end_time; ?></td>
                        <td align="left"><?php echo $row->ext; ?></td>
                        <td align="left"><?php echo getValueFromArr($skill_indexed_arr, $row->skill_id);?></td>
                        <td align="center" valign="middle" width="7%" <?php echo $edit_link_display; ?> ><a href="<?php echo base_url().$this->uri->segment(1).'/save/'.$row->id; ?>"> <img border="0" alt="Edit" title="Edit" src="<?php echo imageUrl(); ?>edit.png"> </a></td>
                      </tr>
                        <?php 
							}
						?>
                      </table></td>
                  </tr>
                  <tr>
                  	<td colspan="5" align="center"> <ul class="paging"> <?php echo  $this->pagination->create_links();  ?> </ul> </td>
                  </tr>
              </table>
				</div>
  </div>           